import { Meta } from '@storybook/blocks';
import YouTubeVideoPlayer from '@/components/YouTubeVideoPlayer';
import * as AlignStories from '../stories/Align.stories';

<Meta of={AlignStories} />

# Align

A widget that aligns its child within itself and optionally sizes itself based on the child's size.

<YouTubeVideoPlayer videoId="g2E7yl3MwMk" />

## Example

```dart liveslice=Align
Container(
  height: 120.0,
  width: 120.0,
  color: Colors.blue[50],
  child: Align(
    alignment: Alignment.topRight,
    child: FlutterLogo(
      size: 60,
    ),
  ),
)
```

## Related Links

- https://api.flutter.dev/flutter/widgets/Align-class.html
- https://youtu.be/g2E7yl3MwMk
